import Vue from 'vue'
import VueRouter from 'vue-router'
// import HomeView from '../views/HomeView.vue'

Vue.use(VueRouter)

const routes = [
    // {

    //     path: '/',
    //     name: 'home',
    //     component: HomeView
    // },
    // {
    //     path: '/about',
    //     name: 'about',
    //     // route level code-splitting
    //     // this generates a separate chunk (about.[hash].js) for this route
    //     // which is lazy-loaded when the route is visited.
    //     component: () =>
    //         import ( /* webpackChunkName: "about" */ '../views/AboutView.vue')
    // }

    // ,
    {
        path: '/emp',
        name: 'emp',
        component: () =>
            import ('../views/butang/MyProject.vue') //对应的vue组件
    },
    {
        path: '/dept',
        name: 'dept',
        component: () =>
            import ('../views/Element/ElementView.vue')
    }, {
        path: '/myLogin',
        name: 'login',
        component: () =>
            import ('../views/butang/login.vue')
    },
    {
        path: '/',
        redirect: '/login' //表示重定向到/emp即可
    },
]

const router = new VueRouter({
    routes
})

export default router